package org.tis.tools.abf.module.ac.entity.vo;

import lombok.Data;
import org.tis.tools.abf.module.ac.entity.AcMenu;
import org.tis.tools.core.utils.StringUtil;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 对外服务的返回信息
 * Created by chenchao
 * Created on 2018/10/18 21:54
 */
@Data
public class AcMenuApiDetail {

    private String guid;

    private String guidFunc;

//    private String funcName;

    private String menuName;

    private String menuLabel;

    private String showName;

//    private String uiEntry;
//
//    private String serviceEntry;
//
//    private BigDecimal menuLevel;

    private String guidParents;

//    private String guidRoot;

    private BigDecimal displayOrder;

//    private String imagePath;
//
//    private String expandPath;
//
//    private String menuSeq;
//
//    private String openMode;

    private List<AcMenuApiDetail> children = new ArrayList<>();

    public AcMenuApiDetail(){}

    public AcMenuApiDetail(AcMenu acMenu, List<AcMenuApiDetail> list){
        this.guid = acMenu.getGuid();
//        this.guidApp = acMenu.getGuidApp();
        this.guidFunc = acMenu.getGuidFunc();
        this.menuName = acMenu.getMenuName();
        this.menuLabel = acMenu.getMenuLabel();
        this.showName = StringUtil.isNotEmpty(acMenu.getMenuLabel()) ? acMenu.getMenuLabel() : acMenu.getMenuName();
//        this.menuCode = acMenu.getMenuCode();
//        this.isleaf = acMenu.getIsleaf();
//        this.uiEntry = uiEntry;
//        this.menuLevel = acMenu.getMenuLevel();
        this.guidParents = acMenu.getGuidParents();
//        this.guidRoot = acMenu.getGuidRoot();
        this.displayOrder = acMenu.getDisplayOrder();
//        this.imagePath = acMenu.getImagePath();
//        this.expandPath = acMenu.getExpandPath();
//        this.menuSeq = acMenu.getMenuSeq();
//        this.openMode = acMenu.getOpenMode();
//        this.createtime = acMenu.getCreatetime();
//        this.lastupdate = acMenu.getLastupdate();
//        this.updator = acMenu.getUpdator();
//        this.dataStatus = acMenu.getDataStatus();
        this.children = list;
    }

    public AcMenuApiDetail(AcMenuApiDetail acMenu, List<AcMenuApiDetail> list){
        this.guid = acMenu.getGuid();
//        this.guidApp = acMenu.getGuidApp();
        this.guidFunc = acMenu.getGuidFunc();
        this.menuName = acMenu.getMenuName();
        this.menuLabel = acMenu.getMenuLabel();
        this.showName = StringUtil.isNotEmpty(acMenu.getMenuLabel()) ? acMenu.getMenuLabel() : acMenu.getMenuName();
//        this.menuCode = acMenu.getMenuCode();
//        this.isleaf = acMenu.getIsleaf();
//        this.uiEntry = uiEntry;
//        this.menuLevel = acMenu.getMenuLevel();
        this.guidParents = acMenu.getGuidParents();
//        this.guidRoot = acMenu.getGuidRoot();
        this.displayOrder = acMenu.getDisplayOrder();
//        this.imagePath = acMenu.getImagePath();
//        this.expandPath = acMenu.getExpandPath();
//        this.menuSeq = acMenu.getMenuSeq();
//        this.openMode = acMenu.getOpenMode();
//        this.createtime = acMenu.getCreatetime();
//        this.lastupdate = acMenu.getLastupdate();
//        this.updator = acMenu.getUpdator();
//        this.dataStatus = acMenu.getDataStatus();
        this.children = list;
    }

}
